package com.patterns.connection;

import com.patterns.Cache;

public class Listener {

	private volatile Cache nearCache;
	private boolean changed = false;

	public void updateInfo(Cache cache) {
		this.changed = true;
		this.nearCache = cache;
	}
	
	public Cache getCache(){
		return nearCache;
	}

	public void disableChanged(){
		this.changed = false;
	}
	
	public boolean isChanged(){
		return changed;
	}
	
}
